using System;
using Ninject;

namespace ITS.Factory
{
    public static class NinjectRepositoriesFactory
    {
        private static IKernel _kernel;
        public static IKernel Kernel
        {
            get
            {
                if (_kernel == null)
                {
                    _kernel = new StandardKernel(new BindingRepositoriesModule());
                }
                return _kernel;
            }
        }

        public static T Get<T>()
        {
            return Kernel.Get<T>();
        }
    }
}
